package com.lgs.demo.base;

import android.widget.BaseAdapter;

import java.util.ArrayList;

/**
 * Created by lgs on 2018/3/10.
 */

public abstract class MyBaseAdapter<ITEMBEAN> extends BaseAdapter {

    public ArrayList<ITEMBEAN> datas = new ArrayList<>();

    public MyBaseAdapter(ArrayList<ITEMBEAN> datas) {
        this.datas = datas;
    }

    @Override
    public int getCount() {
        return datas.size();
    }

    @Override
    public ITEMBEAN getItem(int position) {
        return datas.get(position);
    }

    @Override
    public long getItemId(int position) {
        return position;
    }
}
